from rest_framework import serializers

from goods.models import SpecificationOption

# 规格具体选项表序列化器
class SpecsOptionsSerialzier(serializers.ModelSerializer):
    """
    规格具体选项表序列化器
    """
    id = serializers.IntegerField(read_only=True)
    spec_id = serializers.IntegerField()
    spec = serializers.StringRelatedField()

    class Meta:
        model = SpecificationOption
        fields = "__all__"

